package nameless.aistudy.api.role.user.subjects.english.vocabulary;

import nameless.aistudy.domain.model.subjects.english.vocabulary.dto.WordDetailDTO;
import nameless.aistudy.domain.service.subjects.english.vocabulary.WordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/subject/english/vocabulary")
@CrossOrigin(origins = "http://localhost:8080")
public class EnglishWordController {

    @Autowired
    private WordService wordService;

    @GetMapping("/bookss/{id}")
    public WordDetailDTO getWordDetail(@PathVariable("id") Integer wordId) {
        return wordService.getWordDetail(wordId);
    }

}
